# This package will contain the spiders of your Scrapy project
#
# Please refer to the documentation for information on how to create and manage
# your spiders.
import scrapy
from bs4 import BeautifulSoup

class SpiderPoemSpider(scrapy.Spider):
    # define the fields for your item here like:
    # name = scrapy.Field()
    name = 'gushiwen'
    allow_domains = ['gushiwen.cn']
    start_urls = ['https://so.gushiwen.cn/gushi/tangshi.aspx']

    def parse(self,response):
        txt = response.text
        soup = BeautifulSoup(txt,'html.parser')
        a_list = soup.find_all('a')
        for a in a_list:
            print(a)